/**
 * 
 */
$(document).ready(function() {
	createDialog();
	$("#submit").click(function(){
		$("#dialog").dialog("open");
		alert();
	});
});

function createDialog() {
	var myDialog = $("#dialog").dialog({
		autoOpen : false,
		modal : true,
		buttons : {
			Ok : function() {
				$(myDialog).dialog("close");
			}
		}
	});
}